package com.ruifight.data.bean;

public class TestDataCode {
	private final static int[] so2 ={0,2};//长度2Byte 编码0
	private final static int[] no2 ={1,2};//长度2Byte 编码1
	private final static int[] co ={2,4};//长度4Byte  编码2
	private final static int[] o3 ={3,4};//长度4Byte  编码3
	private final static int[] PM10 ={4,2};//长度4Byte  编码4
	private final static int[] PM2D5 ={5,2};//长度2Byte 编码5
	private final static int[] PM1D0 = {6,2};//长度2Byte 编码6
	private final static int[] TSP = {7,2};//长度2Byte 编码7
	private final static int[] TVOC = {32,2};//长度2Byte 编码32
	private final static int[] co2 = {33,4};//长度4Byte 编码33
	private final static int[] HCHO = {34,2};//长度2Byte 编码34
	private final static int[] CH = {35,4};//碳氢化合物(含非甲烷总烃)长度4Byte 编码35
	private final static int[] temperature = {208,2};//温度Byte2 编码208
	private final static int[] humidity = {209,2}; //相对湿度 编码209
	private final static int[] windDirection = {210,2};//风向 编码210
	private final static int[] windSpeed = {211,2};//风速 编码211
	private final static int[] rain ={212,1};//雨水 编码212
	private final static int[] hourlyPrecipitation ={213,2};//小时降雨量 编码213
	private final static int[] pressure ={214,2};//气压 编码214
	private final static int[] averageNoise={224,2};//平均噪声 编码224
	private final static int[] maximumNoise ={225,2};//最大噪声 编码225
	private final static int[] minimumNoise ={226,2};//最小噪声 编码226
	private final static int[] longitude ={240,4};//经度 编码240
	private final static int[] latitude ={241,4};//维度 编码241
	private final static int[] spare={255,4};//备用 编码255
	
	public static int[] findlenth(int a[]) {
		int[] c= new int[a.length];
		for (int i = 0; i < a.length; i++) {
			if (a[i]==0)
			{
				c[i]=1;
			}
			if (a[i]==1)
			{
				c[i]=2;
			}
			if (a[i]==2)
			{
				c[i]=4;
			}
			if (a[i]==3)
			{
				c[i]=4;
			}
			if (a[i]==4)
			{
				c[i]=2;
			}
			if (a[i]==5)
			{
				c[i]=2;
			}
			if (a[i]==6)
			{
				c[i]=2;
			}
			if (a[i]==7)
			{
				c[i]=2;
			}
			if (a[i]==2)
			{
				c[i]=2;
			}
			if (a[i]==33)
			{
				c[i]=4;
			}
			if (a[i]==34)
			{
				c[i]=2;
			}
			if (a[i]==35)
			{
				c[i]=4;
			}
			if (a[i]==208)
			{
				c[i]=2;
			}
			if (a[i]==209)
			{
				c[i]=2;
			}
			if (a[i]==210)
			{
				c[i]=2;
			}
			if (a[i]==211)
			{
				c[i]=2;
			}
			if (a[i]==212)
			{
				c[i]=1;
			}
			if (a[i]==213)
			{
				c[i]=2;
			}
			if (a[i]==214)
			{
				c[i]=2;
			}
			if (a[i]==224)
			{
				c[i]=2;
			}
			if (a[i]==225)
			{
				c[i]=2;
			}
			if (a[i]==226)
			{
				c[i]=2;
			}
			if (a[i]==240)
			{
				c[i]=4;
			}
			if (a[i]==241)
			{
				c[i]=4;
			}
			if (a[i]==255)
			{
				c[i]=4;
			}
		}
		return c;
	}

}
